//
//  Sanjiao.m
//  安好
//
//  Created by rlp on 14-12-17.
//  Copyright (c) 2014年 lianchuangbrother. All rights reserved.
//

#import "Sanjiao.h"

@implementation Sanjiao

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(void)drawRect:(CGRect)rect

{
    
    //设置背景颜色
    
//    [[UIColor clearColor]set];
//    
//    UIRectFill([self bounds]);
    
    //拿到当前视图准备好的画板
    
    CGContextRef
    context = UIGraphicsGetCurrentContext();
    
    //利用path进行绘制三角形
    
    CGContextBeginPath(context);//标记
    
    CGContextMoveToPoint(context,
                         self.frame.size.width/2, 0);//设置起点
    
    CGContextAddLineToPoint(context,
                            0,self.frame.size.height);
    
    CGContextAddLineToPoint(context,
                            self.frame.size.width, self.frame.size.height);
    
    CGContextClosePath(context);//路径结束标志，不写默认封闭
    
    [[ClassMethodsViewController colorWithHexString:TABBAR_BACKGROUNDCOLOR_16] setFill]; //设置填充色
    
    [[UIColor clearColor] setStroke]; //设置边框颜色
    
    CGContextDrawPath(context,
                      kCGPathFillStroke);//绘制路径path
    
}

@end
